#!/usr/bin/env bash
set -e
case $1 in
    [5-9])
        scr="VGA-0";;
    i3)
        scr="HDMI-0"
        shift;;
    *)
        echo "wrong parameters,please type a number from 5 to 9"
        exit;;
esac

var=`echo "scale=1;$1/10"|bc`
xrandr --output $scr --brightness $var

